package com.bai.websocketandmybatisplus.mapper;

import com.bai.websocketandmybatisplus.model.ChatHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ChatHistoryMapper extends BaseMapper<ChatHistory> {
    @Insert("insert into chat_history(content,created_at) values(#{content},CURRENT_TIMESTAMP)") //数据库服务器生成时间
    public ChatHistory insertOne(ChatHistory chatHistory);
}